package com.suncaper.han_yi_system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.suncaper.han_yi_system.pojo.dto.ApplicationQueryDto;
import com.suncaper.han_yi_system.pojo.dto.ApplicationResultDto;
import com.suncaper.han_yi_system.pojo.entity.Application;
import com.suncaper.han_yi_system.pojo.vo.ApplicationStatsVo;
import com.suncaper.han_yi_system.pojo.vo.ApplicationVo;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;


public interface ApplicationService extends IService<Application> {

    int saveApplication(Application application);

    Page<ApplicationVo> findApplicationByQueryDto(ApplicationQueryDto queryDto);

    Page<ApplicationVo> findMyApplication(ApplicationQueryDto queryDto);

    int resultApplication(ApplicationResultDto resultDto);

    void submitApplication(List<Long> ids);

    ApplicationStatsVo getApplicationStats(ApplicationQueryDto applicationQueryDto);

    XSSFWorkbook exportStatistics(ApplicationQueryDto applicationQueryDto) throws Exception;

    void exportStatisticsToFile(ApplicationQueryDto applicationQueryDto, HttpServletResponse response);
}
